<template>
  <div class="header">
    <div class="box">
      <div class="h-top">
        <img src="../assets/touxiang/beijing.jpg" alt="" />
        <div class="mask">
          <div class="touxiang">
            <div class="i1 iconfont icon-icon"></div>
          </div>
          <div class="name">talia</div>
        </div>
      </div>
      <div class="h-bottom">
        <ul class="list">
          <li class="geqian">这家伙很懒，什么都没有留下</li>
          <li>
            <router-link href="#" to="geren">
              <span class="li-left">个人资料</span>
              <span class="li-right iconfont icon-youjiantou"></span>
            </router-link>
          </li>
          <li>
            <router-link to="dingdan">
              <span class="li-left">我的订单</span>
              <span class="li-right iconfont icon-youjiantou"></span>
            </router-link>
          </li>
          <li>
            <router-link to="shoucang">
              <span class="li-left">我的收藏</span>
              <span class="li-right iconfont icon-youjiantou"></span>
            </router-link>
          </li>
          <li>
            <router-link to="dizhi">
              <span class="li-left">地址管理</span>
              <span class="li-right iconfont icon-youjiantou"></span>
            </router-link>
          </li>
          <li>
            <router-link to="guanli">
              <span class="li-left">账号管理</span>
              <span class="li-right iconfont icon-youjiantou"></span>
            </router-link>
          </li>
        </ul>
      </div>
    </div>
    <my-footer></my-footer>
    <van-tabbar route>
      <van-tabbar-item replace to="/mypage" class="iconfont icon-shouye"
        >首页</van-tabbar-item
      >
      <van-tabbar-item replace to="/mymenu" class="iconfont icon-caidan"
        >菜单</van-tabbar-item
      >
      <van-tabbar-item replace to="/mycart" class="iconfont icon-gouwuche"
        >购物车</van-tabbar-item
      >
      <van-tabbar-item replace to="/mylogin" class="iconfont icon-wodefill"
        v-if="!tokenString">我的</van-tabbar-item
      >
       <van-tabbar-item replace to="/mymine" class="iconfont icon-wodefill"
        v-else>我的</van-tabbar-item
      >
    </van-tabbar>
  </div>
</template>


<style lang="scss" scoped>
.header {
  .h-top {
    width: 100%;
    height: 200px;
    position: relative;
    img {
      width: 100%;
      height: 200px;
    }
    .mask {
      position: absolute;
      border-radius: 10px;
      left: 4px;
      top: 130px;
      width: 98%;
      height: 100px;
      background-color: rgba(255, 255, 255, 0.7);
      display: flex;
      .touxiang {
        margin-top: 28px;
        margin-left: 20px;
        .i1 {
          font-size: 50px;
        }
        img {
          width: 70px;
          height: 70px;
          border-radius: 50%;
        }
      }
      .name {
        margin-left: 14px;
        margin-top: 40px;
      }
    }
  }
  .h-bottom {
    .list {
      list-style: none;
      margin: 0;
      padding: 0;
      li {
        a {
          text-decoration: none;
          color: black;
          width: 100%;
          height: 60px;
          display: block;
          line-height: 60px;
          .li-left {
            font-size: 15px;
            margin-left: 20px;
          }
          .li-right {
            margin-left: 200px;
            font-size: 12px;
          }
        }
      }
      .geqian {
        margin-left: 20px;
        margin-top: 60px;
        font-weight: bold;
      }
    }
  }
}
</style>

<script>
import "../assets/fonts/iconfont.css";
import myFooter from "@/components/my-footer.vue";
import MyFooter from "../components/my-footer.vue";
export default {
  name: "mymine",
  components: {
    myFooter,
  },
  data(){
    return {
      tokenString:null,
    }
  },
  created() {
    if (!this.tokenString) {
      this.tokenString = window.localStorage.getItem("token_list");
      console.log(this.tokenString);
    } else {
      this.tokenString = null;
      console.log(this.tokenString);
    }
  },
};
</script>